]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
AllView: prevent accessing a NULL effect
authorRui Matos <tiagomatos@gmail.com>
Wed, 10 Jun 2015 14:05:41 +0000 (16:05 +0200)
committerRui Matos <tiagomatos@gmail.com>
Fri, 26 Jun 2015 16:09:17 +0000 (18:09 +0200)
In some cases we might be allocated a size such that
this._grid.topPadding and this._grid.bottomPadding are both 0 which
means that the ScrollView fade effect gets removed. In that case don't
try to access the effect since it will be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=750714

js/ui/appDisplay.js

index c938e1f16b791c48a47cf5d4736b0825f03a7974..37cc5ebe0b9bccad5381ae42120cc6dc2a9f102f 100644 (file)
@@ -753,7 +753,8 @@ const AllView = new Lang.Class({
         let fadeOffset = Math.min(this._grid.topPadding,
                                   this._grid.bottomPadding);
         this._scrollView.update_fade_effect(fadeOffset, 0);
-        this._scrollView.get_effect('fade').fade_edges = true;
+        if (fadeOffset > 0)
+            this._scrollView.get_effect('fade').fade_edges = true;
 
         if (this._availWidth != availWidth || this._availHeight != availHeight || oldNPages != this._grid.nPages()) {
             this._adjustment.value = 0;